1. Technical Field
The present invention relates generally to a method and apparatus for supporting virtualization and, more particularly, to technology for supporting the virtualization of a loadable kernel module in an Advanced Reduced instruction set computer (RISC) Machine (ARM) computing structure.
2. Description of the Related Art
Virtualization technology is initiated by making efforts to increase server utilization for multiple users and the application range thereof has been gradually extended to various fields, such as network virtualization and storage virtualization.
Virtualization technology denotes technology for virtualizing and providing the physical sub-structure of a computer system. The physical sub-structure of the computer system begins with the task of virtualizing an Instruction Set Architecture (ISA) that is a machine language-level interface which the computer system can accommodate. The reason for this is that all interfaces capable of recognizing the status of hardware must be blocked so that each software component at a higher level can be individually operated. Such a virtualization technique is similar to emulation, but is different from emulation in that some instructions operate directly on hardware. Emulation enables all hardware operations to be implemented as software, whereas virtualization enables emulation to be applied only to some instructions.
Virtualization-sensitive instructions that are executed on a hardware structure capable of providing virtualization include control-sensitive instructions and behavior-sensitive instructions.
Such a control-sensitive instruction corresponds to an instruction for changing the principal status (or register values) of a Central Processing Unit (CPU) in such a way that the instruction itself changes the base address or the like of virtual memory, and may include instructions for changing a privilege level or changing the base address of virtual memory.
Such a behavior-sensitive instruction corresponds to an instruction for executing different operations depending on the status of the CPU, and may include memory read/write instructions required to access different addresses of physical memory if a virtual address space is changed.
In a device structure for supporting virtualization, all virtualization-sensitive instructions must be defined as privileged instructions. Privileged instructions can be executed only at a privileged level, and cause traps when the privileged instructions are executed in a user mode which is a non-privileged mode.
That is, when a privileged instruction is executed in a non-privileged mode, it is recognized that an exceptional case has occurred, so that the control of the CPU is transferred to a trap handler.
The structure of a virtual machine for supporting virtualization operates individual guest Operating Systems (OSs) in a user mode that is a non-privileged mode so that all virtualization-sensitive instructions are executed under the control of a virtual machine. Instructions causing traps are executed indirectly by a virtual machine monitor, instead of hardware. Further, other instructions are classified as innocuous instructions and are permitted to be directly executed on hardware without requiring emulation, thus preventing the performance of virtualization from being deteriorated. Further, unlike emulation, the virtualization technique enables only some instructions to be emulated, thus minimizing the deterioration of performance while independently maintaining the status of the CPU of each virtual machine.
Virtualization methods can be mainly classified as full virtualization and para-virtualization.
Para-virtualization technology modifies the source code of an OS and enables a plurality of OSs to run on a single hardware component. By means of para-virtualization, when a typical process operating on an OS accesses system resources, a form identical to the use of a system call is implemented. In particular, the source code of an OS that uses instructions requiring special authority (a privilege), such as the switching of execution modes and interrupt/exception processing, is directly modified, and is replaced with a hyper call having a form similar to a system call, so that all instructions requiring special authority in a guest OS are eliminated. By way of this, the guest OS can be implemented using only innocuous instructions, and instructions are directly executed on the processor, unlike full virtualization that is performed based on emulation or code conversion technology, thereby decreasing the deterioration of performance.
Full virtualization is performed by a virtual machine without modifying a guest OS. For this, full virtualization uses emulation for implementing all of the hardware as software, or code conversion technology for replacing instructions requiring special authority with innocuous instructions. In the case of emulation, since both innocuous instructions and privileged instructions are implemented as software, execution speed is very slow, but other processors or hardware platforms can be used, and thus emulation has been widely used to configure an embedded development environment. Code conversion technology denotes technology for dynamically converting privileged instructions of an unmodified guest OS and executing the instructions in a virtual machine. Such a virtual machine divides the code of the guest OS into base blocks and performs a required code conversion task on the base blocks, without immediately executing the code of the guest OS. Actual execution is achieved by the converted code blocks. Full virtualization using code conversion technology is slower than para-virtualization, but is much faster than emulation, and thus full virtualization has been widely utilized in a large number of commercial products.
However, although full virtualization does not require the modification of an OS, it is problematic in that in the runtime, high overhead occurs due to frequent switching between a user mode and a privileged mode. Further, para-virtualization can improve performance using an Application Programming Interface (API) called a hyper call so as to solve the problem of full virtualization, but it requires cost to port an OS. Therefore, when para-virtualization is applied, the most serious problem arises in that a source must be modified into a hyper call. Further, para-virtualization is also problematic in that whenever the OS is modified, such a modification must be repeatedly performed, and thus high cost is caused.
Therefore, a server virtualization apparatus (disclosed in Korean Patent Application Publication No. 10-2011-0041087) is presented which improves performance by combining technology supporting hardware virtualization with para-virtualization technology. However, this technology cannot efficiently solve the problem of additionally requiring a separate module and having higher manufacturing costs, and the problem of having to repeatedly perform the operation of modifying part of an OS into a hyper call API.